package przykladyWykresow;

import java.util.HashMap;

import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;

@SuppressWarnings("serial")
public abstract class ChartPanelAbstract extends ChartPanel {

	public ChartPanelAbstract(JFreeChart chart) {
		super(chart);
	}

	public abstract void changeData();

	public abstract String getTitle();

	public abstract void setTitle(String title);

	public void refresh() {
		changeData();
	}

	@SuppressWarnings("unchecked")
	public void refresh(@SuppressWarnings("rawtypes") HashMap hashMap) {
		setHashMapDataSet(hashMap);
		changeData();
	}

	public abstract HashMap<String, Integer> getHashMapDataSet();

	public abstract void setHashMapDataSet(HashMap<String, Integer> hashMap);

}
